﻿<Window x:Class="ConverterApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="600" Width="1200">
    <DockPanel Margin="5">
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="0,0,0,5">
            <TextBlock VerticalAlignment="Center">Wybierz plik CSV:</TextBlock>
            <TextBox Name="txtInputCsvFilePath" Width="270" Margin="5,0,0,0"></TextBox>
            <Button Name="btnSelectInputCsvFilePath" Margin="5,0,0,0" Width="62" Click="btnSelectInputCsvFilePath_Click">Wybierz...</Button>
            <Button Name="btnLoadInputCsvFile" Margin="5,0,0,0" Width="62" Click="btnLoadInputCsvFile_Click">Wczytaj</Button>
        </StackPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="0,5,0,0">
            <TextBlock VerticalAlignment="Center">Zapisz plik CSV:</TextBlock>
            <TextBox Name="txtOutputCsvFilePath" Width="270" Margin="5,0,0,0"></TextBox>
            <Button Name="btnSelectOutputCsvFilePath" Margin="5,0,0,0" Width="62" Click="btnSelectOutputCsvFilePath_Click">Wybierz...</Button>
            <Button Name="btnLoadOutputCsvFile" Margin="5,0,0,0" Width="62" Click="btnLoadOutputCsvFile_Click">Zapisz</Button>
        </StackPanel>
        <DataGrid Name="dgvTransactions" ItemsSource="{Binding}" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Data" Binding="{Binding Date, StringFormat=yyyy-MM-dd}"></DataGridTextColumn>
                <DataGridTextColumn Header="Płatność" Binding="{Binding PayMode}"></DataGridTextColumn>
                <DataGridTextColumn Header="Info" Binding="{Binding Info}" Width="*"></DataGridTextColumn>
                <DataGridTextColumn Header="Odbiorca" Binding="{Binding PayeeName}"></DataGridTextColumn>
                <DataGridTextColumn Header="Memo" Binding="{Binding Memo}"></DataGridTextColumn>
                <DataGridTextColumn Header="Kwota" Binding="{Binding Amount}"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</Window>
